<nav class="navbar navbar-default navbar-fixup-top" role="navigation">
  <div class="navbar-header">
    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
      <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <a href="/">
      <!--<img alt="TDM" src="/static/pic/tdm_logo.png" />-->
      <span class="navbar-brand">电子听课证设备管理系统</span>
    </a>
  </div>
  <div class="navbar-collapse collapse">
    <ul class="nav navbar-nav navbar-right">
      <li {% ifequal nav_page "main" %}class="active"{% endifequal %}><a href="/tdm/main/">首页</a></li>
      <!--
      {% if user_role %}
      <li {% ifequal nav_page "power" %}class="active"{% endifequal %}><a href="/tdm/power/">电源监控</a></li>
      <li {% ifequal nav_page "network" %}class="active"{% endifequal %}><a href="/tdm/network/">网络监控</a></li>
      <li {% ifequal nav_page "server" %}class="active"{% endifequal %}><a href="/tdm/server/">服务器监控</a></li>
      <li {% ifequal nav_page "mdm" %}class="active"{% endifequal %}><a href="/tdm/mdm/">移动设备监控</a></li>
      {% endif %}
      -->
      <li {% ifequal nav_page "acard" %}class="active"{% endifequal %}><a href="/tdm/acard/">电子考勤监控</a></li>
      {% if user_role %}
      <li {% ifequal nav_page "log" %}class="active"{% endifequal %}><a href="/tdm/log/">告警记录</a></li>
      {% endif %}
      <li class="dropdown  {% ifequal nav_page 'admin' %}active{% endifequal %}">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
          <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
          {{user_obj.name}} <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
          <li><a href="/tdm/login/">登陆</a></li>
          <li><a href="/tdm/logout/">退出</a></li>
          <li><a href="/tdm/profile/">账号</a></li>
          <li class="divider"></li>
          <li><a href="/tdm/report/">统计报表</a></li>
          {% if user_role %}
          <li class="divider"></li>
          <li><a href="/tdm/admin/">后台管理</a></li>
          {% endif %}
        </ul>
      </li>
    </ul>
    <ul id="jxd-menu" class="nav navbar-nav navbar-right">
    </ul>
  </div>
</nav>
